package org.future.wsdl.data;

import java.util.ArrayList;
import java.util.List;

/**
 * xs:complexType 元素信息
 * @author dycc
 *
 */
public class XComplexType {

    private String name;
    
    private String namespace;
    
    private List<XElementInner> innerEleList = new ArrayList<XElementInner>();
    
    private XElementInner parentEleInner;
    
    // name
    public String getName() {
        return name;
    }
    public void setName(String name) {
        this.name = name;
    }
    // namespace
    public String getNamespace() {
        return namespace;
    }
    public void setNamespace(String namespace) {
        this.namespace = namespace;
    }
    // innerEleList
    public List<XElementInner> getInnerEleList() {
        return innerEleList;
    }
    public void setInnerEleList(List<XElementInner> innerEleList) {
        this.innerEleList = innerEleList;
    }
    // parentEleInner
    public XElementInner getParentEleInner() {
        return parentEleInner;
    }
    public void setParentEleInner(XElementInner parentEleInner) {
        this.parentEleInner = parentEleInner;
    }
    
    /**
     * toString
     */
    public String toString(){
        StringBuffer sb = new StringBuffer();
        sb.append("<xs:complexType name=\"" + name + "\">");
        sb.append("\n");
        sb.append("<xs:sequence>");
        sb.append("\n");
        for(int i=0;i<innerEleList.size();i++){
            sb.append(innerEleList.get(i));
            sb.append("\n");
        }
        sb.append("</xs:sequence>");
        sb.append("\n");
        sb.append("</xs:complexType>");
        return sb.toString();
    }
}
